#include "startwindow.h"

StartWindow::StartWindow(QWidget *parent) : QWidget(parent)
{
    resize(400,500);
    setWindowTitle(GAME_TITLE);
    setWindowIcon(QIcon(GAME_ICON));

    QPixmap background(PLANE_PATH);
    QPalette palette;
    palette.setBrush(QPalette::Background, background);
    setPalette(palette);

    buttonstart=new QPushButton("开始游戏",this);
    buttongameover=new QPushButton("退出游戏",this);
    buttonstart->setGeometry(100,200,200,100);
    buttongameover->setGeometry(100,320,200,100);

    connect(buttonstart,&QPushButton::clicked,[=](){
        emit buttonstartSignal();
    });

    connect(buttongameover,&QPushButton::clicked,[=](){
        this->close();
    });

    this->show();
}

